﻿using System.Collections.Generic;
using System.Linq;

namespace HarryPotter
{
    public static class CHarryPotter
    {
        private const double ProcePerBook = 8.0;

        public static double CalcPrice(int[] basket )
        {
            var basketOne = new BasketPermutation(basket);
            return basketOne.CalculatePrice();

            // return SimpleCalcPriceNoDiscount( basket );
        }

        public static double SimpleCalcPriceNoDiscount(int[] basket)
        {
            double result = 0.0;

            foreach( int bookCount in basket )
            {
                result += bookCount*ProcePerBook;                
            }

            return result;
        }

    }
}
